$str = 'Hello World!'; $str2 = "Hello World!";
$str3 = $str2.' '.$str1;
echo strlen($str3); echo $str3[5]; echo substr($str3, 5, 6); echo strtoupper($str3);
$str = 'Hello World!'; $str2 = "Hello World!";
$str3 = $str2.' '.$str1;
echo strlen($str3); echo $str3[5]; echo substr($str3, 5, 6); echo strtoupper($str3);
$ar1 = array(5, 4, 6, 9, "ali"); $ar2 = array(3=>5, 4=>6, 'ali'=>'Ahmad');
foreach ($ar2 as $key =>$val) echo "$key : $val <br/>";
asort($ar1); ksort($ar1); array_kieys($ar1); array_values($ar1); array_combine($ar1, $ar2);
$i = 100; if ($i < 10) echo "less than"; else echo "greater than";
for ($i=0; $i < 10; $i++) echo $i;
$i = 0; while ($i < 10){ echo $i; $i++; }
int preg_match ( string $pattern , string $subject [, array &$matches [, int $flags [, int $offset ]]] ) int preg_match_all ( string $pattern , string $subject , array &$matches [, int $flags [, int $offset ]] ) mixed preg_replace ( mixed $pattern , mixed $replacement , mixed $subject [, int $limit [, int &$count ]] )
$string = 'April 15, 2003'; $pattern = '/(\w+) (\d+), (\d+)/i'; $replacement = '$2 $1 $3'; echo preg_replace($pattern, $replacement, $string);
class Student { public $id = '81232'; public function getId() { return $this->id; } public function setId($new_id){ $this->id = $new_id; } }
$s = new Student; $s->setId('82346188'); echo $s->getId(); echo $s->id;
<FORM ACTION="action.php" METHOD=POST> . . . </FORM>
session_start(); $_SESSION
Server (username, password, server) Database Table.